/*
 * Chud.h
 *
 *      Author: Boboss
 */

#ifndef CHUD_H_
#define CHUD_H_

#include <osg/Node>
#include <osgDB/ReadFile>

#include <osgText/Font>
#include <osgText/Text>
#include <osgText/TextBase>
#include <osg/MatrixTransform>
#include <osg/Geode>
#include <osg/Projection>
#include <osg/ShapeDrawable>
#include <osg/Geometry>
#include <sstream>
#include <iostream>
#include <stdlib.h>

class Chud {
private:
	osg::ref_ptr<osg::Geode>  _hudGeode;
	osg::ref_ptr<osg::Projection> _hudProjection;
	osg::ref_ptr<osg::MatrixTransform> _hudModelViewMatrix;
	osg::ref_ptr<osg::StateSet> _hudStateSet;

	osg::ref_ptr<osgText::Text> _nbOfBomb;
	osg::ref_ptr<osgText::Text> _nbOfBombDiffuse;
	osg::ref_ptr<osgText::Text> _timeLeft;
	osg::ref_ptr<osgText::Text> _frameRate;

	int _width , _height;
	int _nbBomb, _nbBombDiffuse;
	float _bombTimer, _bombTimerMax;

	std::string _numberOfBomb;
	std::string _numberOfBombDiffuse;

public:
	Chud(int width, int height);
	osg::Projection* getHud(){ return _hudProjection.get(); };
	void update(int nbBomb, int nbBombDiffuse, float bombTimer, float bombTimerMax, bool win, float delta);
	virtual ~Chud();
};

#endif /* CHUD_H_ */
